package com.codebattery.client;

import com.codebattery.domain.model.MemberInfo;
import com.codebattery.domain.model.ReceiveAddressInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "user-service")
public interface UserFeignClient {

    @RequestMapping(value = "/member/get-member", method = RequestMethod.GET)
    MemberInfo getMember(@RequestParam Long memberId);

    @RequestMapping(value = "/member-receive-address/get", method = RequestMethod.POST)
    ReceiveAddressInfo getReceiveAddress(@RequestParam Long addressId);
}